home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ 12⁄1⁄89 / 0398-Dimmed TextListView -Jan90 < prev    next >
Encoding:
Text File  |  1990-01-12  |  1.5 KB  |  50 lines  |  [TEXT/GEOL]

  1. Item    0099433                         11-Jan-90        11:49
  2.  
  3. From:   MADA2                           MacApp Dev Assoc, Curtis Faith
  4.  
  5. To:     D1950                           CSG, Don Phillips,PRT
  6.  
  7. cc:     MACAPP.TECH$                    MacApp Technical
  8.  
  9. Sub:    Dimmed TextListView Items
  10.  
  11. Linda,
  12.  
  13. I have done something very similar to what you are requesting for the AppleLink
  14. filing application I am working on.
  15.  
  16. What I needed was some way of indicating that a certain AppleLink should not be
  17. processed and saved.  I have a button that Forgets an AppleLink.  What this
  18. really involves is dimming the AppleLink's TextListView item.  (I also X it out
  19. so that it is apparent that it will be forgotten)
  20.  
  21. You need to do several things.
  22.  
  23. 1) have some way of determining which items are dimmed,  is there a list of
  24. Objects that relates to the TextListView etc.  Some property of the list must
  25. determine the state dimmed or not, perhaps a field fIsDimmed.
  26.  
  27. 2) OVERRIDE CanSelectItem to return FALSE for items that have the state that
  28. causes them to be dimmed (fIsDimmed is TRUE).
  29.  
  30. 2) OVERRIDE DrawCell to do this:
  31.  
  32. INHERITED DrawCell (aCell,aQDRect);
  33.  
  34.  IF ("fIsDimmed is TRUE for this item") THEN
  35.   BEGIN
  36.   PenPat(gray);
  37.   PenMode(patBic);
  38.   PaintRect(aQDRect);  { dim the cells }
  39.   PenNormal;
  40.   END;
  41.  
  42. I forget why exactly but it seemed that patBic and gray worked out the best for
  43. the dimming.  I think it made it easier to read the items even when they were
  44. dimmed.  You might also try patXor.
  45.  
  46. I hope this helps,
  47.  
  48. Curtis
  49.  
  50.